package com.jbit.userserver.controller;

import com.jbit.common.ResponseEntity;
import com.jbit.common.ResponseUtils;
import com.jbit.userserver.model.entity.PlatformConfig;
import com.jbit.userserver.service.PlatformConfigService;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;

@RestController
@RequestMapping("/platformConfig")
public class PlatformConfigController {
    @Resource
    private PlatformConfigService platformConfigService;
    @GetMapping("/getInfoByKey")
    public ResponseEntity<PlatformConfig> getInfoByKey(String platformKey){
        return ResponseUtils.sendSuccess(platformConfigService.getPlatformByKey(platformKey));
    }
}
